<!DOCTYPE html>

<html>
	<head>
		<link rel="stylesheet" href="../../../themes/themeroller/default-theme/ui.all.css" type="text/css" media="screen" />
		<link rel="stylesheet" href="../../../themes/nokia/ext-theme/default/360x640/custom.css" type="text/css" media="screen" />

		<script src="../../../lib/jquery/jquery.js" type="text/javascript" charset="utf-8"></script>

		<script src="../../../src/defaults.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../src/core.js" type="text/javascript" charset="utf-8"></script>
		
		<style type="text/css" media="screen">

			body {
				padding: 10px;
				font-size: 14px;
				font-family: "Trebuchet MS", "Helvetica", "Arial",  "Verdana", "sans-serif";
			}

		</style>
		
	</head>

	<body>

		<div id="datepicker"></div>

		<script type="text/javascript" charset="utf-8">
		
			if (window.widget) {
				widget.setNavigationEnabled(false);
			}

			var init = function() {
				
				// creating a new instance of Nokia.SampleWidget that inherits from Nokia.Widget
				window.datepicker = new Nokia.DatePicker({
					//i18n: 'pt-BR',
					element: '#datepicker',
					yearRange: 5,
					create: function() {
						console.log('Datepicker: created', this);
					},
					setDay: function(day) {
						console.log('Datepicker: setDay', this, day);
					},
					setMonth: function(month) {
						console.log('Datepicker: setMonth', this, month);
					},
					setYear: function(year) {
						console.log('Datepicker: setYear', this, year);
					},
					setDate: function(date) {
						console.log('Datepicker: setDate', this, date);
					}
				});
				
				/*
				 * Hide splash when its all done.
				*/
				
				Nokia.hideSplash();
					
			};
			
			/*
			 * Show splash while loading components.
			*/
				
			Nokia.showSplash('<span>loading</span>');
			
			Nokia.use('datepicker', init);

		</script>

	</body>
</html>